]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
dbusServices/screencast: Install unconditionally
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 18 May 2022 14:43:45 +0000 (16:43 +0200)
committerMarge Bot <marge-bot@gnome.org>
Fri, 20 May 2022 12:00:22 +0000 (12:00 +0000)
We currently decide at build time whether to include screencast
support, based on whether the required gst/pipewire library headers
are installed.

That check is imprecise, because having the library headers available
at build time doesn't necessarily mean that the libraries are there
at runtime, or that the corresponding typelibs are installed.

It makes more sense to check the requirements at runtime, so prepare
for that by installing the screencast service unconditionally, but
bail out early if the dependencies aren't met.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2297>

js/dbusServices/meson.build
js/dbusServices/screencast/main.js

index eb941ed905b17d924eaa7df0d84aec23adfff43d..48b7f89fc8067c778632f995f28101a499c5a9ea 100644 (file)
@@ -6,15 +6,10 @@ launcherconf.set('libdir', libdir)
 dbus_services = {
   'org.gnome.Shell.Extensions': 'extensions',
   'org.gnome.Shell.Notifications': 'notifications',
+  'org.gnome.Shell.Screencast': 'screencast',
   'org.gnome.ScreenSaver': 'screensaver',
 }
 
-if enable_recorder
-  dbus_services += {
-    'org.gnome.Shell.Screencast': 'screencast',
-  }
-endif
-
 config_dir = '@0@/..'.format(meson.current_build_dir())
 
 foreach service, dir : dbus_services
index 4a244264f092db93eaeff6c69ee819b25fa39d2c..0bea967aef89f5ecc054ad50040e5639af3d1433 100644 (file)
@@ -1,9 +1,13 @@
 /* exported main */
 
+const Config = imports.misc.config;
 const { DBusService } = imports.dbusService;
-const { ScreencastService } = imports.screencastService;
 
 function main() {
+    if (!Config.HAVE_RECORDER)
+        return;
+
+    const { ScreencastService } = imports.screencastService;
     const service = new DBusService(
         'org.gnome.Shell.Screencast',
         new ScreencastService());